//
//  HJFightVC.m
//  project
//
//  Created by hu on 2019/4/4.
//  Copyright © 2019 健健. All rights reserved.
//

#import "HJFightVC.h"
#import "HJFightCell.h"

@interface HJFightVC ()

@end

@implementation HJFightVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navTitle = @"选择航班";
}

-(void)configTableView {
    self.tableViewStyle = UITableViewStylePlain;
    [super configTableView];
    
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 10;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    HJFightCell *fightListCell = [tableView cellForRowAtIndexPath:indexPath];
    if (!fightListCell) {
        fightListCell = [[NSBundle mainBundle]loadNibNamed:@"HJFightCell" owner:nil options:nil].firstObject;
    }
    fightListCell.backgroundColor = [UIColor clearColor];
    WS(weakSelf)
    fightListCell.selecteBlock = ^(NSString * _Nonnull fightId) {
        NSLog(@"选中航班");
        [weakSelf.navigationController popViewControllerAnimated:YES];
        weakSelf.fightBlock(@"中国国航");
    };
    return fightListCell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 123;
}
@end
